Skip to content

feat: Added support for read_json for duckdb and clickhouse#5608

Merged
max-sixty merged 4 commits intoPRQL:mainfrom
adamnemecek:main
Dec 12, 2025
Merged

feat: Added support for read_json for duckdb and clickhouse#5608
max-sixty merged 4 commits intoPRQL:mainfrom
adamnemecek:main

Conversation

@adamnemecek
Copy link
Copy Markdown
Contributor

DuckDB target didn't expose read_json, despite exposing read_csv and read_parquet.

It is unclear to me how I am supposed to add a test.

I tested it using this bash script

SQL=$(cargo run --quiet --bin prqlc -- compile <<'PRQL'
prql target:sql.duckdb
from (read_json "prqlc/prqlc/tests/integration/data/chinook/albums.json")
PRQL
)
duckdb -c "$SQL"

I tested only DuckDB.

adamnemecek and others added 3 commits December 12, 2025 10:44
- Replace large albums.json (1737 lines) with minimal media_types.json (5 records)
- Combine read_json test into existing read_csv.prql using append
- Add inline tests for DuckDB, ClickHouse, and generic dialects
- Fix docs example to use explicit join conditions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty changed the title Added support for read_json for duckdb and clickhouse feat: Added support for read_json for duckdb and clickhouse Dec 12, 2025
@max-sixty
Copy link
Copy Markdown
Member

@adamnemecek I pushed a bunch of changes, hope that's OK! thanks a lot for starting this, great work

@max-sixty
Copy link
Copy Markdown
Member

(adding a function to the stdlib causes all the ids to increment, hence the very large diff...)

@adamnemecek
Copy link
Copy Markdown
Contributor Author

@adamnemecek I pushed a bunch of changes, hope that's OK! thanks a lot for starting this, great work

Thanks a lot! In fact, I was hoping someone would pick up the torch since I knew there were things that were missing but I wasn't sure what to add as there is a lot going on.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty
Copy link
Copy Markdown
Member

Thanks a lot! In fact, I was hoping someone would pick up the torch since I knew there were things that were missing but I wasn't sure what to add as there is a lot going on.

very easy for me to finish it off! feel free to do this again if you have anything to add

@max-sixty max-sixty merged commit e45644c into PRQL:main Dec 12, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants